<?php

class Conexion {
    var $con;
	function Conexion(){
            $this->con=  pg_connect("user=postgres port=5432 dbname=vitrina host=localhost password=postgres");
	}
	function get_conexion(){
            if($this->con){
                return $this->con;
            }
            else{
                echo "error al conectar a la base de datos";
            }
          
	}
}

?>
